<template>
  <div class="container" style="margin-top: 10px"  >
    <div v-for="order in refused_orders">
    <div class="list-group ">
    <div class="media list-group-item"  >
      <div class="media-left">
        <img class="media-object" src="../assets/ic_female_medical.png" alt="...">
      </div>
      <div class="media-body">
        <h5 class="media-heading">患者姓名：{{order.patientname}}</h5>
        <h5 class="well well-sm"><small>提交时间:{{order.times}}</small></h5>
      </div>
      <p>问诊内容:{{order.symptom}}</p>
    </div>
    </div>
    <div class="media list-group-item">

      <div class="media-body">
        <h5 class="media-heading">医生姓名：{{order.doctor}}</h5>
        <h5 class="well well-sm"></h5>
      </div>
      <div class="media-right">
      </div>
      <p>回复内容{{order.diagnosis}}</p>
    </div>
    </div>
    </div>
</template>

<script>
  export default {
    name: 'OrderDetail',
  data(){
    return {
      refused_orders: [],
      order_id:''
    }
  },
    methods:{
    getPost() {
      var test = window.location.href;
      var attr= test.split("=");
      console.log(attr[1]);
      var Opid =localStorage.getItem('Opid');
      this.$ajax.get('http://47.75.110.31:8080/orinfo/findByIdAndOpid?opid='+Opid+'&id='+attr[2])
        .then(response => {
          this.refused_orders = response.data;
        }).catch(function (err) {
        console.log(err)
      })
    },
  },
  mounted () {
    this.getPost()
  }
  }
</script>

<style scoped>
</style>
